﻿<UserControl x:Class="Samurai.Client.Controls.SelectFolderDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <Style x:Key="StyleButton" TargetType="Button">
            <Setter Property="Width" Value="100" />
            <Setter Property="Height" Value="25" />
        </Style>
        
        <Style x:Key="StyleTextBox" TargetType="TextBox">
            <Setter Property="Width" Value="250" />
            <Setter Property="Height" Value="25" />
        </Style>
        
    </UserControl.Resources>
    <DockPanel>
        <Button Margin="5" Style="{StaticResource StyleButton}" DockPanel.Dock="Right" Click="BrowseFolder">Browse</Button>
        <TextBox Margin="5" Style="{StaticResource StyleTextBox}"  Padding="2" HorizontalAlignment="Stretch" DockPanel.Dock="Right" 
           Text="{Binding Text, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" />
    </DockPanel>
</UserControl>